//    Copyright (C) Kherty.  All rights reserved.
using OpenLS.Core.Serialization;

namespace OpenLS.Drawing
{
    public abstract class TextUnderlineFillBase: IOfficeXmlSerializable
    {
        public abstract void ReadXml(ReadContext context);
        public abstract void WriteXml(WriteContext context);

        internal static TextUnderlineFillBase ReadTextUnderlineFill(ReadContext cc)
        {
            switch (cc.Reader.LocalName)
            {
                case "uFillTx":
                    return cc.ReadElement<TextUnderlineFill>();
                case TextUnderlineFillGroupWrapper.xmlName: //\\\ "uFill":
                    return cc.ReadElement<TextUnderlineFillGroupWrapper>();
                default:
                    return null;
            }
        }
    }
}